﻿<!doctype html>
<html>

<head>
    <meta charset="utf-8">
    <title>split ,join 数组与字符串相互转换</title>
    <style>
    * {
        margin: 0;
        padding: 0;
        list-style: none;
        font-family: "微软雅黑", "张海山锐线体简"
    }
    </style>
    <script>
    var str='12^_^5^_^bmw';
    document.write(str.split('^_^'));  // 字符-->数组

    //var arr = [12, 5, 'bmw'];
    //document.write(arr.join('-_-||')); // 数组-->字符  规则：自定义规则
    </script>
</head>

<body>
</body>

</html>
